package com.example.restaurant.dao;

import com.example.restaurant.model.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author x
 * @since 2022-09-29
 */
public interface RoleMapper extends BaseMapper<Role> {

    //查询对应角色
    @Select("select role_name from role where role_id = #{roleId}")
    String getRoleById(@Param("roleId") int roleId);

}
